/*
 *  (C) Copyright 2008 Insula T.I. Ltda.
 * 
 *  This file is part of Vulcano.
 *
 *  Vulcano is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Vulcano is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with Vulcano.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.openinsula.vulcano.orm.command.factory;

import org.openinsula.vulcano.core.command.Command;
import org.openinsula.vulcano.orm.command.DaoCommand;
import org.openinsula.vulcano.orm.command.DaoCommandWithoutResult;
import org.openinsula.vulcano.orm.dao.Dao;
import org.springframework.transaction.annotation.Transactional;

/**
 * {@link Command} implementation that invokes corresponding {@link Dao} method.
 * 
 * @author rebola
 * @author yanaga
 * @since 1.1
 * @see DaoCommand
 * @see DaoCommandWithoutResult
 */
@Transactional(readOnly = true)
public class RefreshCommand extends AbstractEntitiesCommand {

	private static final long serialVersionUID = 1L;

	public RefreshCommand(final Object... entities) {
		super(entities);
	}

	@Override
	public void executeWithoutResult() {
		dao.refresh(entities);
	}

}
